import React from 'react'
import { Form, Input, Radio } from 'antd';

interface Props {
  fileName:number | string
}



const Judge:React.FC<Props> = (props) => {



  return (
    <div>
      <Form.Item
        label="题目"
        name={ [props.fileName, "question"] }
        rules={[
          {
            required: true, 
            message: "请输入题目",
          },
        ]}
        >
          <Input placeholder='请输入题目'/>
      </Form.Item>
      <Form.Item
        label="是否正确"
        name={ [props.fileName, "answer"] }
        rules={[
          { required: true, message: "请选择正确答案" },
        ]}
        >
          <Radio.Group>
            <Radio value={true}> 对 </Radio>
            <Radio value={false}> 错 </Radio>
          </Radio.Group>
      </Form.Item>
      <Form.Item
        label="解析"
        name={ [props.fileName, "desc"] }
      >
        <Input.TextArea rows={4} placeholder="请输入解析" />
      </Form.Item>
    </div>
  )
}

export default Judge